package felix.rule.data.msg;

import com.fasterxml.jackson.databind.JsonNode;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;

@Data
@Slf4j
@NoArgsConstructor
public class EntityRelation {

    public static final String CONTAINS_TYPE = "CONTAINS";
    public static final String MANAGES_TYPE = "MANAGES";

    public static final String CHAIN_TYPE = "CHAIN";
    public static final String NODE_TYPE = "NODE";

    private String fromId;
    private String toId;
    private String type;
    private String entityType;
    private RelationType relationType;
    private transient JsonNode additionalInfo;

    public EntityRelation(String fromId, String toId, String type, String entityType, RelationType relationType) {
        this(fromId, toId, type, entityType, relationType, null);
    }

    public EntityRelation(String fromId, String toId, String type, String entityType, RelationType relationType, JsonNode additionalInfo) {
        this.fromId = fromId;
        this.toId = toId;
        this.type = type;
        this.entityType = entityType;
        this.relationType = relationType;
        this.additionalInfo = additionalInfo;
    }

}
